<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<th:block th:include="include :: header('修改仓库')"/>
	<style>
		.col-sm-3 {
			width: 30%!important;
		}
	</style>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-wareInfo-edit" th:object="${wareInfo}">
            <input id="wareId" name="wareId" th:field="*{wareId}" type="hidden">
			<div class="form-group">
				<label class="col-sm-3 control-label">仓库编码：</label>
				<div class="col-sm-8">
					<input id="wareCode" name="wareCode" th:field="*{wareCode}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">仓库名称：</label>
				<div class="col-sm-8">
					<input id="wareName" name="wareName" th:field="*{wareName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">仓库类型：</label>
				<div class="col-sm-8">
					<select name="type" id="type" class="form-control" v-model="checkType">
						<option value="1">立体</option>
						<option value="2">平仓</option>
						<option value="3">地堆</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">仓库环境：</label>
				<div class="col-sm-8">
					<select name="wareEv" id="wareEv" class="form-control" v-model="checkEv">
						<option value="1">常温</option>
						<option value="2">冷冻</option>
						<option value="3">冷藏</option>
						<option value="4">防爆</option>
						<option value="5">阴凉</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="memo" name="memo" th:field="*{memo}" class="form-control" type="text" required>
				</div>
			</div>
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">爆仓预警（%）：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="expectedWaring" name="expectedWaring" th:field="*{expectedWaring}" class="form-control" type="number" required>-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">爆仓报警（%）：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="alarm" name="alarm" th:field="*{alarm}" class="form-control" type="number" required>-->
<!--				</div>-->
<!--			</div>-->

<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">物料数量在框中占比上限（%）：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="boxParam" name="boxParam" th:field="*{boxParam}" class="form-control" type="number" required>-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">单箱可储存高度（毫米）：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="boxHeight" name="boxHeight" th:field="*{boxHeight}" class="form-control" type="number" required>-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">不合格物料存储天数（天）：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="unqualifiedStorageDay" name="unqualifiedStorageDay" th:field="*{unqualifiedStorageDay}" class="form-control" type="number" required>-->
<!--				</div>-->
<!--			</div>-->
		</form>
		<form th:object="${wareInfo}">
			<input id="checkType" th:field="*{type}" type="hidden">
			<input id="checkEv" th:field="*{wareEv}" type="hidden">
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/wareInfo";

		function submitHandler(){
	        if($.validate.form()){
	            $.operate.save(prefix + "/edit", $('#form-wareInfo-edit').serialize());
	        }
	    }

	    var app = new Vue({
			el: '.wrapper',
			data: {
				checkType: '',
				checkEv: ''
			},
			created(){
				this.checkType = document.getElementById('checkType').value;
				this.checkEv = document.getElementById('checkEv').value;
			}
		})
	</script>
</body>
</html>
